import request from './request.js';

// 登录
export function getlogin(data) {
	return request({
		url: 'mini/login',
		method: 'POST',
		data
	})
}

// 获取验证码
export function getText() {
	return request({
		url: 'captchaImage',
		method: 'get',
	})
}
// 拿到个人信息
export function getUserinfo() {
	return request({
		url: 'getInfo',
		method: 'get',
	})
}
//退出
export function logout() {
	return request({
		url: 'logout',
		method: 'post'
	})
}
//轮播图&公告
export function getnotice(data) {
	return request({
		url: 'advertising/list',
		method: 'post',
		data
	})
}
//商品展示
export function getproduct(data) {
	return request({
		url: 'product/list',
		method: 'post',
		data
	})
}
//地址
export function getdelivery(data) {
	return request({
		url: 'delivery/address/list',
		method: 'post',
		data
	})
}
//新增地址
export function adddelivery(data) {
	return request({
		url: 'delivery/address/add',
		method: 'post',
		data
	})
}
//编辑地址
export function editdelivery(data) {
	return request({
		url: 'delivery/address/edit',
		method: 'post',
		data
	})
}
//删除地址
export function removedelivery(data) {
	return request({
		url: 'delivery/address/remove',
		method: 'post',
		data
	})
}
//获取poenid
export function openiddelivery(data) {
	return request({
		url: 'pay/openid',
		method: 'post',
		data
	})
}
//创建订单
export function adddeliverys(data) {
	return request({
		url: 'orders/add',
		method: 'post',
		data
	})
}
//订单列表
export function listorders(data) {
	return request({
		url: 'orders/list',
		method: 'post',
		data
	})
}
//查询订单量
export function collateorders(data) {
	return request({
		url: 'orders/collate',
		method: 'post',
		data
	})
}
//门店列表
export function listshop(data) {
	return request({
		url: 'shop/list/location',
		method: 'post',
		data
	})
}
//意见反馈
export function addfeedback(data) {
	return request({
		url: 'feedback/add',
		method: 'post',
		data
	})
}
//联系我们
export function listabout(data) {
	return request({
		url: 'about/list',
		method: 'post',
		data
	})
}
//查询余额
export function flowwallet(data) {
	return request({
		url: 'wallet/flow/wallet',
		method: 'post',
		data
	})
}
//流水记录
export function walletlist(data) {
	return request({
		url: 'wallet/flow/list',
		method: 'post',
		data
	})
}
//提现
export function walletout(data) {
	return request({
		url: 'wallet/flow/cash/out',
		method: 'post',
		data
	})
}


//门店标识
export function getshoplist(data) {
	return request({
		url: 'shop/type/list',
		method: 'post',
		data
	})
}


//门店标识
export function getKlist(data) {
	return request({
		url: 'shop/list',
		method: 'post',
		data
	})
}

//订单列表
export function getorderlist(data) {
	return request({
		url: 'orders/list',
		method: 'post',
		data
	})
}

//订单修改
export function setorderlist(data) {
	return request({
		url: 'orders/edit',
		method: 'post',
		data
	})
}


//查询余额
export function getwallet(data) {
	return request({
		url: 'wallet/flow/wallet',
		method: 'post',
		data
	})
}